#include<iostream>
using std::endl;
using std::cout;
#include<map>
using std::map;
#include<vector>
using std::vector;
#include<queue>
using std::priority_queue;
#include <unordered_map>
using std::unordered_map;
using std::make_pair;

typedef struct v4tims_s{
    int value;//value
    int times;//次数
}v4tims_t;

class Compare{
    public:
    bool operator()(const  v4tims_t&rhs,const v4tims_t &lhs){
        if(rhs.times > lhs.times){
            return true;
        }
        else{
            return false;
        }
    }
};

int test0(){
    priority_queue<v4tims_t,vector<v4tims_t>,Compare> _pri_que;
    _pri_que.push({1,2});
    _pri_que.push({3,7});
    _pri_que.push({1,5});
    _pri_que.push({11,8});
    _pri_que.push({17,12});
    _pri_que.push({3,6});
    while(!_pri_que.empty()){
        cout<<_pri_que.top().value<<" "<<_pri_que.top().times<<endl;
        _pri_que.pop();
    }
}

int main(void){
    test0();
}